import VueRouter from 'vue-router'

//导入路由组件
import sent from './components/sentCenter/sent.vue'
import share from './components/shareCenter/share.vue'
import demand from './components/demandCenter/demand.vue'
import sent_need from './components/sentCenter/sent_need.vue'
import sent_share from './components/sentCenter/sent_share.vue'
import share_time from './components/shareCenter/share_time.vue'
import share_skill from './components/shareCenter/share_skill.vue'
import demand_urgent from './components/demandCenter/demand_urgent.vue'
import demand_waithelp from './components/demandCenter/demand_waithelp.vue'

import myorder from './components/asideMenu/myorderCenter/myorder.vue'
import order_sharewait from './components/asideMenu/myorderCenter/order_sharewait.vue'
import order_sharesure from './components/asideMenu/myorderCenter/order_sharesure.vue'
import order_sharing from './components/asideMenu/myorderCenter/order_sharing.vue'

import order_demandwait from './components/asideMenu/myorderCenter/order_demandwait.vue'
import order_demandstarting from './components/asideMenu/myorderCenter/order_demandstarting.vue'
import order_demandwaitsure from './components/asideMenu/myorderCenter/order_demandwaitsure.vue'

import order_waitpay from './components/asideMenu/myorderCenter/order_waitpay.vue'
import order_receivable from './components/asideMenu/myorderCenter/order_receivable.vue'
import order_completed from './components/asideMenu/myorderCenter/order_completed.vue'
import order_cancel_overtime from './components/asideMenu/myorderCenter/order_cancel_overtime.vue'

import authentication from './components/asideMenu/authenticationCenter/authentication.vue'
import au_realname from './components/asideMenu/authenticationCenter/au_realname.vue'
import au_student from './components/asideMenu/authenticationCenter/au_student.vue'

import person from './components/asideMenu/personalCenter/person.vue'
import pe_altername from './components/asideMenu/personalCenter/pe_altername.vue'
import pe_defaultcontact from './components/asideMenu/personalCenter/pe_defaultcontact.vue'
import pe_alterphonenumber from './components/asideMenu/personalCenter/pe_alterphonenumber.vue'
import pe_setpwd_first from './components/asideMenu/personalCenter/pe_setpwd_first.vue'
import pe_setpwd_second from './components/asideMenu/personalCenter/pe_setpwd_second.vue'
import pe_binwechat from './components/asideMenu/personalCenter/pe_binwechat.vue'

//用于测试的组件
import test from './test.vue'

// 3. 创建路由对象
var router = new VueRouter({
  // mode:'history',
  routes: [
    { path:'/',redirect:'/sent'},

    { 
      path:'/sent',
      redirect:'/sent/sent_need',
      component:sent,
      children:[
        { path:'sent_need',component:sent_need },
        { path:'sent_share',component:sent_share }
      ]
    },

    { 
      path:'/share',
      redirect:'/share/share_time',
      component:share,
      children:[
        { path:'/share/share_time',component:share_time },
        { path:'/share/share_skill',component:share_skill },
      ] 
    },
    

    { 
      path:'/demand',
      redirect:'/demand/demand_urgent',
      component:demand, 
      children:[
        { path:'/demand/demand_urgent',component:demand_urgent },
        { path:'/demand/demand_waithelp',component:demand_waithelp },
      ] 
    },
    { path:'/myorder',component:myorder },
    { path:'/myorder/order_sharewait',component:order_sharewait },
    { path:'/myorder/order_sharesure',component:order_sharesure },
    { path:'/myorder/order_sharing',component:order_sharing },

    { path:'/myorder/order_demandwait',component:order_demandwait },
    { path:'/myorder/order_demandstarting',component:order_demandstarting },
    { path:'/myorder/order_demandwaitsure',component:order_demandwaitsure },
    
    { path:'/myorder/order_waitpay',component:order_waitpay },
    { path:'/myorder/order_receivable',component:order_receivable },
    { path:'/myorder/order_completed',component:order_completed },
    { path:'/myorder/order_cancel_overtime',component:order_cancel_overtime },

    { path:'/authentication',component:authentication },
    { path:'/authentication/au_realname',component:au_realname },
    { path:'/authentication/au_student',component:au_student },

    { path:'/person',component:person },
    { path:'/person/pe_altername',component:pe_altername },
    { path:'/person/pe_defaultcontact',component:pe_defaultcontact },
    { path:'/person/pe_alterphonenumber',component:pe_alterphonenumber },
    { path:'/person/pe_setpwd_first',component:pe_setpwd_first },
    { path:'/person/pe_setpwd_second',component:pe_setpwd_second },
    { path:'/person/pe_binwechat',component:pe_binwechat },

    { path:'/test',component:test }
  ]
})

// 把路由对象暴露出去
export default router